//
//  popV.m
//  jiaKaoZhuShou
//
//  Created by 金艺社 on 2018/5/23.
//  Copyright © 2018年 金艺社. All rights reserved.
//

#import "popV.h"
#import "ResetLoginPasswordVC.h"
@implementation popV

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (void)awakeFromNib {
    [super awakeFromNib];
    self.backgroundColor = [UIColor colorWithWhite:0 alpha:0.5];
    
    self.back_V.layer.masksToBounds = YES;
    self.back_V.layer.cornerRadius = 10;
    
    self.cancel_btn.layer.masksToBounds = YES;
    self.cancel_btn.layer.cornerRadius = 18;
    self.cancel_btn.layer.borderColor = [UIColor custom_color:@"#A91E23"].CGColor;
    self.cancel_btn.layer.borderWidth = 1;
    
    self.confirm_btn.layer.masksToBounds = YES;
    self.confirm_btn.layer.cornerRadius = 18;
    
    self.content_tf.layer.masksToBounds = YES;
    self.content_tf.layer.cornerRadius = 1;
    self.cancel_btn.layer.borderWidth = 1;
    self.content_tf.layer.borderColor = [UIColor custom_color:@"#F1F1F1"].CGColor;
    
    //点击手势
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tapClick:)];
    tap.numberOfTapsRequired = 1;
    [self addGestureRecognizer:tap];
}
- (void)tapClick:(UITapGestureRecognizer *)tap {
    [self removeFromSuperview];
}
- (IBAction)forgetPasswordClick:(id)sender {
    [[helpPublic getCurrentViewController:self] dismissViewControllerAnimated:NO completion:nil];
    ResetLoginPasswordVC *VC = [ResetLoginPasswordVC new];
    VC.title = @"重置交易密码";
    UINavigationController *c = (UINavigationController *)self.window.rootViewController;
    [c pushViewController:VC animated:YES];
    [self removeFromSuperview];
}
- (IBAction)cancleClick:(id)sender {
    [self removeFromSuperview];
}
- (IBAction)confirmClick:(id)sender {
    [self removeFromSuperview];
    self.cblock(1, self.content_tf.text);
}
@end
